package app.displayTree.analyze {
    import app.displayTree.analyze.texture.DisplayTreeTextureGenerate;

    import copyengine.infoTree.meta.CESTextureMeta;
    import copyengine.utils.UUIDFactory;

    import flash.display.DisplayObject;
    import flash.utils.Dictionary;

    /**
     * 辅助DisplayTreeAnalyst
     * 封装一些和递归遍历无关的基础方法
     */
    public final class DisplayTreeAnalyzeSupport {
        private var mTextureGenerate:DisplayTreeTextureGenerate;

        public function DisplayTreeAnalyzeSupport() {
            mTextureGenerate = new DisplayTreeTextureGenerate();
            UUIDFactory.instance.setUniquePR("index_");
        }

        public function clean():void {
            mTextureGenerate = new DisplayTreeTextureGenerate();
            UUIDFactory.instance.setUniquePR("index_");
        }

        public function exportAllTextureMetaVector():Vector.<CESTextureMeta> { return mTextureGenerate.exportAllTextureMetaVector(); }

        public function exportTextureBitmapDic():Dictionary { return mTextureGenerate.exportTextureBitmapDic(); }

        public function pushMcToExportAndReturnMcTextureInfo(_target:DisplayObject):CESTextureMeta {
            return mTextureGenerate.getTargetTextureMeta(_target);
        }

    }
}
